package edu.sctu.liangyuxiang.day20150521;

/**
* Created by user20 on 2015/5/21.
*/
public class TextData {
    Teacher[] teacher = new Teacher[2];
    Student student = new Student();

        public Teacher[] getTeacher(){
            Teacher teacher = new Teacher();
            teacher.name = "张三";
            teacher.course = "计算机";
            teacher.number = 100610;
            teacher.sex = "男";
            teacher.title = "教授";
            Student[] student1 = new Student[5];
            for (int i = 0; i < student1.length ; i++) {
                student.name = "李四" + i;
                student.age = 18 + i;
                student.number = 140610;
                student.code = 58 + i;
                student.sex = "男" + i;
                student.adress = "成都市";
                student1[i] = student;
                teacher.student = student1;
            }

        Teacher teacher1 = new Teacher();
        teacher1.name = "王二";
        teacher1.course = "高数";
        teacher1.number = 100612;
        teacher1.sex = "女";
        teacher1.title = "讲师";
        Student[] student2 = new Student[5];
        for (int i = 0; i < student2.length ; i++) {
            student.name = "李四" + i;
            student.age = 20 + i;
            student.number = 140612;
            student.code = 57 + i;
            student.sex = "男" + i;
            student.adress = "龙泉驿";
            student2[i] = student;
            teacher1.student = student2;
        }
        this.teacher[0] = teacher;
        this.teacher[1] = teacher1;

        return this.teacher;
    }

    public Student[] setStudentCourse(){
        Student[] studentcourse = new Student[3];
        TextCourse textCourse = new TextCourse();

        textCourse.course = "计算机";
        studentcourse[0].course[0].course = textCourse.course;
        studentcourse[1].course[0].course = textCourse.course;
        studentcourse[2].course[0].course = textCourse.course;

        textCourse.course = "语文";
        studentcourse[1].course[1].course = textCourse.course;
        studentcourse[0].course[1].course = textCourse.course;

        textCourse.course = "生物";
        studentcourse[2].course[1].course = textCourse.course;

        textCourse.course = "数学";
        studentcourse[1].course[2].course = textCourse.course;
        studentcourse[0].course[2].course = textCourse.course;

        textCourse.course = "物理";
        studentcourse[2].course[2].course = textCourse.course;

        return studentcourse;
    }
}
